import re
from typing import List, Dict
import xml.etree.ElementTree as ET

def parse_item_list(prompt: str) -> List[Dict[str, str]]:
    """Parse a prompt string to extract ITEM_LIST content and convert to JSON objects.
    
    Args:
        prompt: The input string containing XML-like ITEM_LIST content
        
    Returns:
        List of dictionaries where each dictionary represents an ITEM with its tags as keys
        
    Raises:
        ValueError: If input string is empty, no ITEM_LIST found, or invalid XML format
    """
    if not prompt:
        raise ValueError("Input string cannot be empty")
        
    # Find the ITEM_LIST content
    item_list_match = re.search(r'<ITEM_LIST>(.*?)</ITEM_LIST>', prompt, re.DOTALL)
    if not item_list_match:
        raise ValueError("No valid ITEM_LIST content found in the input string")
        
    items_xml = f"<root>{item_list_match.group(1)}</root>"
    
    try:
        root = ET.fromstring(items_xml)
        result = []
        
        for item in root.findall('ITEM'):
            item_dict = {}
            for child in item:
                item_dict[child.tag] = child.text.strip() if child.text else ''
            result.append(item_dict)
            
        return result
    except ET.ParseError as e:
        raise ValueError(f"Invalid XML format: {str(e)}")